package com.xyh.eduservice.controller;

import com.xyh.commonutils.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin  //解决跨域
public class EduLoginController {

    //login
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //info
    @GetMapping("/info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://pic3.zhimg.com/50/v2-88b5c680d8e1bbec6de4024f3bc1e784_720w.jpg?source=1940ef5c");
    }
}
